; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__SCRIPTLAYOUT__') = 'UNDEFINED' THEN
__SCRIPTLAYOUT__ SET 1
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
include 'MixedMode.a'
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
OffPair RECORD 0
offFirst ds.w 1 ; offset: $0 (0)
offSecond ds.w 1 ; offset: $2 (2)
sizeof EQU * ; size: $4 (4)
ENDR
OffsetTable RECORD 0
elements ds.b 3 * OffPair.sizeof
sizeof EQU * ; size: $C (12)
ENDR
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
; CharToPixel directions
leftCaret EQU 0 ;Place caret for left block
rightCaret EQU -1 ;Place caret for right block
kHilite EQU 1 ;Direction is SysDirection
smLeftCaret EQU 0 ;Place caret for left block - obsolete
smRightCaret EQU -1 ;Place caret for right block - obsolete
smHilite EQU 1 ;Direction is TESysJust - obsolete
;Constants for styleRunPosition argument in PortionLine, DrawJustified, MeasureJustified, CharToPixel, and PixelToChar.
onlyStyleRun EQU 0 ; This is the only style run on the line
leftStyleRun EQU 1 ; This is leftmost of multiple style runs on the line
rightStyleRun EQU 2 ; This is rightmost of multiple style runs on the line
middleStyleRun EQU 3 ; There are multiple style runs on the line and this is neither the leftmost nor the rightmost.
smOnlyStyleRun EQU 0 ; obsolete
smLeftStyleRun EQU 1 ; obsolete
smRightStyleRun EQU 2 ; obsolete
smMiddleStyleRun EQU 3 ; obsolete
; type for styleRunPosition parameter in PixelToChar etc.
; typedef short JustStyleCode
FormatOrder RECORD 0
elements ds.w 1
sizeof EQU * ; size: $2 (2)
ENDR
; typedef FormatOrder * FormatOrderPtr
; move FormatStatus to TextUtils.i
;
; pascal short Pixel2Char(Ptr textBuf, short textLen, short slop, short pixelWidth, Boolean *leadingEdge)
;
IF ¨ GENERATINGCFM THEN
Macro
_Pixel2Char
move.l #$820E0014,-(sp)
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION Pixel2Char
ENDIF
;
; pascal short Char2Pixel(Ptr textBuf, short textLen, short slop, short offset, short direction)
;
IF ¨ GENERATINGCFM THEN
Macro
_Char2Pixel
move.l #$820C0016,-(sp)
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION Char2Pixel
ENDIF
;
; pascal short PixelToChar(Ptr textBuf, long textLength, Fixed slop, Fixed pixelWidth, Boolean *leadingEdge, Fixed *widthRemaining, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF ¨ GENERATINGCFM THEN
Macro
_PixelToChar
move.l #$8222002E,-(sp)
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION PixelToChar
ENDIF
;
; pascal short CharToPixel(Ptr textBuf, long textLength, Fixed slop, long offset, short direction, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF ¨ GENERATINGCFM THEN
Macro
_CharToPixel
move.l #$821C0030,-(sp)
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION CharToPixel
ENDIF
;
; pascal void DrawJustified(Ptr textPtr, long textLength, Fixed slop, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF ¨ GENERATINGCFM THEN
Macro
_DrawJustified
move.l #$80160032,-(sp)
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION DrawJustified
ENDIF
;
; pascal void MeasureJustified(Ptr textPtr, long textLength, Fixed slop, Ptr charLocs, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF ¨ GENERATINGCFM THEN
Macro
_MeasureJustified
move.l #$801A0034,-(sp)
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION MeasureJustified
ENDIF
;
; pascal Fixed PortionLine(Ptr textPtr, long textLen, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF ¨ GENERATINGCFM THEN
Macro
_PortionLine
move.l #$84120036,-(sp)
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION PortionLine
ENDIF
;
; pascal void HiliteText(Ptr textPtr, short textLength, short firstOffset, short secondOffset, OffsetTable offsets)
;
IF ¨ GENERATINGCFM THEN
Macro
_HiliteText
move.l #$800E001C,-(sp)
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION HiliteText
ENDIF
;
; pascal void DrawJust(Ptr textPtr, short textLength, short slop)
;
IF ¨ GENERATINGCFM THEN
Macro
_DrawJust
move.l #$8008001E,-(sp)
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION DrawJust
ENDIF
;
; pascal void MeasureJust(Ptr textPtr, short textLength, short slop, Ptr charLocs)
;
IF ¨ GENERATINGCFM THEN
Macro
_MeasureJust
move.l #$800C0020,-(sp)
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION MeasureJust
ENDIF
;
; pascal Fixed PortionText(Ptr textPtr, long textLength)
;
IF ¨ GENERATINGCFM THEN
Macro
_PortionText
move.l #$84080024,-(sp)
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION PortionText
ENDIF
;
; pascal long VisibleLength(Ptr textPtr, long textLength)
;
IF ¨ GENERATINGCFM THEN
Macro
_VisibleLength
move.l #$84080028,-(sp)
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION VisibleLength
ENDIF
;
; pascal void GetFormatOrder(FormatOrderPtr ordering, short firstFormat, short lastFormat, Boolean lineRight, StyleRunDirectionUPP rlDirProc, Ptr dirParam)